package com.competition.system.service.impl;

import com.competition.system.dao.RaceDao;
import com.competition.system.pojo.Race;
import com.competition.system.service.RaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Lyq
 * @version 1.0
 * @create 2020/12/17 20:34
 */
@Service
public class RaceServiceImpl implements RaceService {

    @Autowired
    private RaceDao raceDao;


    @Override
    public List<Race> queryRaceList() {

        List<Race> raceList = raceDao.findAll();

        return raceList;
    }

    @Override
    public Race addRace(Race race) {
        return raceDao.save(race);
    }
}
